<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<!-- Casting SPELs in Lisp - Emacs Lisp Edition, a Comic Book
     Written by Conrad Barski, M.D., http://lisperati.com
     Edited by James A. Webb, http://uberkode.com -->

<head>

  <title>Casting SPELs in Lisp (31)</title>
  <meta http-equiv="content-type" content="text/html;charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="author" content="James A. Webb" />
  <meta name="date" content="2007-09-16T00:00:00+00:00" />
  <meta name="keywords" content="Emacs, Lisp" />

</head>

<body>

<center>

<table cellspacing="10" width="500">
  <tr>
    <td bgcolor="#AAFFAA" height="50" align="center">
        <b>Addendum</b>
    </td>
  </tr>
  <tr>
    <td>
      OK, now let's talk about some issues that were glossed over 
      in this tutorial...
    </td>
  </tr>
  <tr>
    <td>
      One <i>major cheat</i> that we did in this tutorial is writing
      our game sentences using symbols:
    </td>
  </tr>
  <tr>
    <td>
<pre style="font-weight: bolder; color: darkblue">
  '(this is not how Lispers usually write text -)

  "Lispers write text using double quotes"
</pre>
    </td>
  </tr>
  <tr>
    <td>
      Symbols have a special meaning in Lisp and are used to store
      unique names of functions, variables, and other things. Because
      of this, Lisp treats symbols in special ways that are awkward
      for text messages. Using strings instead of symbols allows text
      we work with to not be affected by any such quirks, but
      requires more esoteric commands for manipulating text. Also,
      working with strings is not so relevant to teaching the far
      more important symbol manipulation commands in Lisp.
    </td>
  </tr>
  <tr>
    <td>
      Another simplification is that association lists (also called
      <tt>alist</tt>s) are usually written using a
      <i>dotted list</i>, because it is slighlty more efficient and
      elegant to an experienced Lisper. This is confusing to
      beginners, however, because it requires an understanding of
      <a href="http://c2.com/cgi/wiki?ConsCell" >Cons Cells</a>.
    </td>
  </tr>
  <tr>
    <td>
      Another glossed over issue is that SPELs are more commonly
      referred to as "Lisp true macros" and are created with the
      <tt>defmacro</tt> command, which is very confusing for teaching
      purposes. Read the following short essay to understand why I
      think this name distinction is beneficial. And finally, there
      are ugly name collisions that can happen when a SPEL is written
      in the style of the <tt>game-action</tt> SPEL. If you read more
      advanced Lisp materials this will be explained in greater detail.
    </td>
  </tr>
  <tr>
    <td align="center">
      &lt;&lt; <a href="casting-spels-emacs-1.html">begin</a>
      &lt; <a href="casting-spels-emacs-30.html">previous</a> - 
      <a href="casting-spels-emacs-32.html">next</a> &gt;
      <a href="casting-spels-emacs-35.html" >end</a> &gt;&gt;
    </td>
  </tr>
</table>

</center>

</body>

</html>